package com.igeekhome.mapper;

import com.igeekhome.pojo.Scan;
import com.igeekhome.pojo.ScanExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ScanMapper {
    int countByExample(ScanExample example);

    int deleteByExample(ScanExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Scan record);

    int insertSelective(Scan record);

    List<Scan> selectByExample(ScanExample example);

    Scan selectByPrimaryKey(Integer id);
    
    Scan select(Scan scan,Integer id);

    int updateByExampleSelective(@Param("record") Scan record, @Param("example") ScanExample example);

    int updateByExample(@Param("record") Scan record, @Param("example") ScanExample example);

    int updateByPrimaryKeySelective(Scan record);
    
    /**
    * @author 汪璇
    * @Description 根据运单id更新扫描
    * @Param [record]
    * @Return int
    **/
    int updateByWaybillIdSelective(Scan record);

    int updateByPrimaryKey(Scan record);
    
    /**
    * @author 汪璇
    * @Description 根据waybillId改变扫描表状态为删除
    * @Param [waybillId] 运单表id
    * @Return int
    **/
    int updateStatusByWaybillId(Integer waybillId);
    
    int updateOrderStatus(Integer willId,String status);
    
    /**
    * @Description 根据传入的id和status改变scan表的状态
    * @Param [id, status]
    * @Return int
    **/
    int updateStatus(Integer id,Integer status);
 
}